aptly repo
aptly repo#
Local repository is a collection of packages (most usually custom packages created internally). Multiple versions of the same package could be added to the repository. In order to capture current repository state we use snapshot
repo#
Create#
Create local package repository. Repository would be empty when created, packages could be added to the repository from local files, copied or moved from another local repository or imported from the mirror. more
aptly -distribution="jammy" -architectures="amd64" \
repo \
create \
my_repo
List#
Commands list displays list of all local package repositories. more
aptly repo list
Add#
Command adds packages to local repository from .deb more
From deb folder location
aptly repo add my_repo *deb
Snapshot#
Snapshot is a fixed state of remote repository mirror or local repository. Internally snapshot is list of references to packages.
Creates snapshot from current state of local package repository.
aptly snapshot create <name> from repo <repo-name>
aptly snapshot create \
snap_my_repo \
from repo my_repo
Publish#
Publishes snapshot as repository to be consumed by apt. more
aptly publish snapshot <name> [<prefix>]
- prefix: Add prefix to repo url
- architectures: publish only selected arc from snapshot
- distribution: distribution name to publish
- skip-signing: don’t sign Release files with GPG
aptly -architectures="amd64" -skip-signing=true \
publish snapshot -architectures="amd64" \
snap_my_repo local
Serve#
aptly can serve published repositories using its own embedded webserver. more
aptly server
source.list#
- Add this line to use by apt
deb http://lap2:8080/local/ jammy main